package com.hangwei.paperless.view.window.acceptsee;

import android.support.v7.widget.LinearLayoutManager;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;

import com.hangwei.paperless.MainSeeActivity;
import com.hangwei.paperless.R;
import com.hangwei.paperless.adapter.accept.Item5Adapter;
import com.hangwei.paperless.model.bean.AcceptCheckInfo;
import com.hangwei.paperless.view.BaseView;
import com.hangwei.paperless.widget.MaxRecyclerView;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by 张龙臣 on 2020/11/24.
 */

public class AcceptItem5See extends BaseView<MainSeeActivity, List<AcceptCheckInfo.TBean>> {

    private MaxRecyclerView mRecyclerView;
    private Item5Adapter mAdapter;

    public AcceptItem5See(MainSeeActivity activity) {
        super(activity);
    }

    @Override
    protected View initView() {
        View inflate3 = LayoutInflater.from(mActivity).inflate(R.layout.page_accept_check_view5, null);
        TextView tvMsg3 = inflate3.findViewById(R.id.tvMsg);
        tvMsg3.setText("6、非正常缺陷 Abnormal Defects");

        TextView tvSave = inflate3.findViewById(R.id.tvSave);
        tvSave.setVisibility(View.GONE);
        mRecyclerView = inflate3.findViewById(R.id.recyclerView);
        return inflate3;
    }

    @Override
    public void bindData(List<AcceptCheckInfo.TBean> list) {
        mRecyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
        mAdapter = new Item5Adapter(list) {
            @Override
            protected void scan(String id) {

            }

            @Override
            protected void showBigPic(ArrayList<String> picList, int position) {
                mActivity.showBigPic(picList,position);
            }
        };
        mAdapter.setEnable(false);
        mRecyclerView.setAdapter(mAdapter);
    }
}
